package edu.zut.cs.software.estateagent.visitor.web.spring.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;

import edu.zut.cs.software.base.web.spring.controller.GenericController;
import edu.zut.cs.software.estateagent.visitor.domain.Visitor;
import edu.zut.cs.software.estateagent.visitor.service.VisitorManager;

@Controller
@CrossOrigin(origins = "*")
@RequestMapping("/visitor")
public class VisitorController extends GenericController<Visitor, Long, VisitorManager> {

	VisitorManager visitorManager;

    @RequestMapping("/index")
    public String index() {
        return "visitor/index";
    }

    @Autowired
    public void setDealingManager(VisitorManager visitorManager) {
        this.visitorManager = visitorManager;
        this.manager = this.visitorManager;
    }
}